<div id="goods_exshow_config" class="tableform">
	<div class="division">
	    <h4>基本设置</h4>
    	<table width="100%" cellpadding="1" cellspacing="1">
			<tr>
            	<th width="20%">版块标题</th>
                <td width="30%"><input class="inputstyle" type="text" name="title" value="<{$setting.title}>"  />&nbsp;&nbsp;<i>留空则不显示标题项</i></td> 
                <th width="20%">更多连接</th>
                <td width="30%"><input class="inputstyle" type="text" name="more" value="<{$setting.more}>"  />&nbsp;&nbsp;<i>留空则不显示</i></td>
            </tr>      
             <tr>
            	<th width="20%">最多展示数量：</th>
                <td width="30%"><input class="inputstyle" type="text"  name="limit"  value="<{$setting.limit}>" />个商品</td> 
                <th width="20%">板块背景</th>
                <td width="30%"><{input type="color" name="bgcolor" value=$setting.bgcolor}></td>
            </tr>  
			<tr>
              <th width="20%">商品价格截取：</th>
              <td width="30%"><{input type="text" name="cutnum" value=$setting.cutnum|default:'2' vtype="required&&number" class="inputstyle" style="width:50px"}> 位小数</td>
            </tr>
        </table>
	</div>
    <div class="division">
	    <h4>产品设置</h4>
        <div class="goods-selector-handle clearfix">
            <div class="span-auto">
                <label>
                    <input type="radio"  name="selector" value="filter"  <{if $setting.selector=="filter"}>checked<{/if}> />&nbsp;范围选择商品
                </label>
            </div>
            <div class="span-auto">
                <label><input type="radio"  name="selector" value="select"  <{if $setting.selector=="select"}>checked<{/if}> />&nbsp;精确选择商品</label>
            </div>
        </div>
        <div class="division goods-selector">
            <div data-extend = "filter" <{if $setting.selector=="select"}>style="display:none"<{/if}>>
                <{input type="goodsfilter"  name="goods_filter"  value=$setting.goods_filter}>
                <div class="division">
                    排序规则：
                    <select  name="goods_order_by">
                        <{foreach from=$data.goods_order_by item=item}>
                        <option value="<{$item.condition}>"  <{if $setting.goods_order_by == $item.condition}>selected<{/if}>><{$item.label}></option>
                        <{/foreach}>
                    </select>
                </div>
            </div>
            <div data-extend = "select"  <{if $setting.selector=="filter"}>style="display:none;"<{/if}>>
                <{input type="goods_select"
                object="goods@b2c"
                pdt_name="goods_select"
                pdt_value=$setting.goods_select
                obj_name="goods_select_linkobj"
                obj_value=$setting.goods_select_linkobj
                }>
            </div>

        </div>
    </div>
</div>
<script>
    $$('#goods_exshow_config .goods-selector-handle input[type=radio]').addEvent('change',function(){
        var radio  = this;
        if(!radio.checked)return;
        $$('#goods_exshow_config .goods-selector [data-extend]').each(function(item){

            if(item.get('data-extend')!=radio.value){
                item.hide();
                }else{
                item.show();
            }

        });

    });
	function addPic(){
        var url='index.php?app=desktop&act=alertpages&goto='+encodeURIComponent("index.php?app=image&ctl=admin_manage&act=image_broswer&type=big");
        Ex_Loader('modedialog',function(){
            return new imgDialog(url,{onCallback:function(image_id,image_src){
                    $('ad_pic').value=image_src;
            }})	;
        });
    }
</script>
